package com.consumer.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.consumer.client.UserClient;
import com.consumer.pojo.User;

/**
 * Feign Controller
 * 
 * @author gzp
 *
 */
@RestController
@RequestMapping("/consumerfeign/")
public class ConsumerFeignController {

	@Autowired
	private UserClient userCilent;

	@GetMapping("{id}")
	public User getById(@PathVariable String id) {
		return userCilent.getById(id);
	}
}
